from pynumpak.type import func_t


def diff(f: func_t, x: float, h: float = 1e-5):
    return (f(x + h) - f(x - h)) / (2 * h)
